home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Transactor
/
Transactor_10_1986_Transactor_Publishing.d64
/
head cleaner
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
926b
|
39 lines
100 rem* improved 1541 head cleaning prg *
110 print"[147]insert cleaning disk and hit return"
120 geta$:ifa$<>chr$(13)then120
130 open 15,8,15:print#15,"m-e"chr$(126)chr$(249)
140 rem locate head
150 print#15,"m-r"chr$(24)chr$(0)
160 get#15,a$:x=asc(a$+chr$(0))
165 if x=0 then end
170 print"drive head at track #"x
180 rem read $1c00
190 print#15,"m-r"chr$(0)chr$(28)
200 get#15,sc$:sc=asc(sc$+chr$(0))
210 rem select bits 0 and 1
220 bt=sc and 3
230 rem # tracks to 1
240 sp=2*(x-1)
250 rem move head to track 1
260 print"stepping to track #1"
270 for y=1 to sp
280 bt=bt-1:bt=bt and 3
290 s=(sc and 252)or bt
300 print#15,"m-w"chr$(0)chr$(28)chr$(1)chr$(s)
310 next y
320 rem step out to 35
330 print"stepping out to track # 35..."
340 print#15,"m-r"chr$(0)chr$(28)
350 get#15,a$:sc=asc(a$+chr$(0))
360 bt=sc and 3
370 for y=1 to 68
380 print"track #"int(y/2+1)
390 print"[145][145][145][145]"
400 bt=bt+1: bt=bt and 3
410 s=(sc and 252) or bt
420 print#15,"m-w"chr$(0)chr$(28)chr$(1)chr$(s)
430 ford=1to220:nextd
440 next y
450 print#15,"m-e"chr$(232)chr$(249):close15
460 new: rem to prevent re-running without a normal disk operation first